package com.lb.shopguide.http.method;

import com.lb.baselib.http.ApiMethodBase;
import com.lb.shopguide.http.ApiClient;
import com.trello.rxlifecycle2.LifecycleProvider;

import io.reactivex.Observer;
import okhttp3.RequestBody;
import retrofit2.http.Body;

public class ApiMethodBoss extends ApiMethodBase {

    public static void bossLogin(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.bossLogin(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void refreshYXTokenInBoss(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.refreshYXTokenInBoss().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void addShopManager(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.addShopManager(body).compose(provider.bindUntilEvent(event)), observer);
    }


    public static void addShop(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.addShop(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStoreById(Observer observer, int id, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStoreById(id).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void staffQuit(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.staffQuit(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getDistrictInfo(Observer observer, LifecycleProvider provider, Object event) {
        if (provider != null) {
            ApiSubscribe(ApiClient.bossService.getDistrictInfo().compose(provider.bindUntilEvent(event)), observer);
        } else {
            ApiSubscribe(ApiClient.bossService.getDistrictInfo(), observer);
        }
    }

    public static void getPointSettingsInShop(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getPointSettingsInShop().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStaffListInStore(Observer observer, String storeCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStaffListInStore(storeCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStoreList(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStoreList().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getMerchantStaticInfo(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getMerchantStaticInfo().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getMerchantInfo(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getMerchantInfo().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getFinanceList(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getFinanceList().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getWithdrawCashInfo(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getWithdrawCashInfo().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void setPointConfig(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.setPointConfig(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void editMerchantInfo(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.editMerchantInfo(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getPerformanceData(Observer observer, int dateType, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getPerformanceData(dateType).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getMemberData(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getMemberData().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getMerStoreSaleCountData(Observer observer, String storeCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getMerStoreSaleCountData(storeCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStoreMoneyCountData(Observer observer, String storeCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStoreMoneyCountData(storeCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStoreMemberData(Observer observer, String storeCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStoreMemberData(storeCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getNoviceGuidance(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getNoviceGuidance().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getActivityList(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getActivityList().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getStoreMemberProportion(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getStoreMemberProportion().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void confirmOrderCharge(Observer observer, String orderNum, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.confirmOrderCharge(orderNum).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void getBossMessage(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.getBossMessage().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void closeMsg(Observer observer, String msgCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.closeMsg(msgCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void chargeInOutMoney(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.chargeInOutMoney(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void bossFeedback(Observer observer, @Body RequestBody body, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.bossFeedback(body).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void listTemplate(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.listTemplate().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void listActivityApplication(Observer observer, int type, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.listActivityApplication(type).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void listMyActivity(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.listMyActivity().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void checkActivityApplication(Observer observer, int type, String applyCode, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.checkActivityApplication(type, applyCode).compose(provider.bindUntilEvent(event)), observer);
    }

    public static void listActivitySuggestion(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.listActivitySuggestion().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void hasNewActivitySuggestion(Observer observer, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.hasNewActivitySuggestion().compose(provider.bindUntilEvent(event)), observer);
    }

    public static void readActivitySuggestion(Observer observer, String msgId, LifecycleProvider provider, Object event) {
        ApiSubscribe(ApiClient.bossService.readActivitySuggestion(msgId).compose(provider.bindUntilEvent(event)), observer);
    }

}
